--Keyboard Toggle
require "import"
import "android.provider.Settings"
import "com.androlua.*"
service.postClick(300,{{"%选择输入法", }})
task(600,function()
this.getSystemService(this.INPUT_METHOD_SERVICE).showInputMethodPicker()
task(1100,function()
kbd=Settings.Secure.getString(this.getContentResolver(),Settings.Secure.DEFAULT_INPUT_METHOD):match("(.*)/")
if kbd == "com.samsung.android.honeyboard" then
service.click({{"Gboard*$1","#button2", }})
service.postSpeak(1500,"تم اختيار Gboard")
else
service.click({{"*Samsung*#1$1", "#android:id/button2", }})
service.postSpeak(1500,"تم اختيار Samsung")
end
end)
end)